package com.example.tutormanagement.exception;

import com.example.tutormanagement.pojo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * &#064;Date: 23/06/14-16:44
 * &#064;Description:
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)//捕获所有异常
    public Result exc(Exception ex) {
        ex.printStackTrace();
        return Result.error("500");
    }

}
